;; This software is Copyright (c) cage
;; cage grants you the rights to distribute
;; and use this software as governed by the terms
;; of the Lisp Lesser GNU Public License
;; (http://opensource.franz.com/preamble.html),
;; known as the LLGPL

;;; This file was automatically generated by SWIG (http://www.swig.org).
;;; Version 2.0.4
;;;
;;; Do not make changes to this file unless you know what you are doing--modify
;;; the SWIG interface file instead.

(in-package :cl-pslib)

;;;SWIG wrapper code starts here

(cl:defmacro defanonenum (&body enums)
   "Converts anonymous enums to defconstants."
  `(cl:progn ,@(cl:loop for value in enums
                        for index = 0 then (cl:1+ index)
                        when (cl:listp value) do (cl:setf index (cl:second value)
                                                          value (cl:first value))
                        collect `(cl:defconstant ,value ,index))))

(cl:eval-when (:compile-toplevel :load-toplevel)
  (cl:unless (cl:fboundp 'swig-lispify)
    (cl:defun swig-lispify (name flag cl:&optional (package cl:*package*))
      (cl:labels ((helper (lst last rest cl:&aux (c (cl:car lst)))
                    (cl:cond
                      ((cl:null lst)
                       rest)
                      ((cl:upper-case-p c)
                       (helper (cl:cdr lst) 'upper
                               (cl:case last
                                 ((lower digit) (cl:list* c #\- rest))
                                 (cl:t (cl:cons c rest)))))
                      ((cl:lower-case-p c)
                       (helper (cl:cdr lst) 'lower (cl:cons (cl:char-upcase c) rest)))
                      ((cl:digit-char-p c)
                       (helper (cl:cdr lst) 'digit 
                               (cl:case last
                                 ((upper lower) (cl:list* c #\- rest))
                                 (cl:t (cl:cons c rest)))))
                      ((cl:char-equal c #\_)
                       (helper (cl:cdr lst) '_ (cl:cons #\- rest)))
                      (cl:t
                       (cl:error "Invalid character: ~A" c)))))
        (cl:let ((fix (cl:case flag
                        ((constant enumvalue) "+")
                        (variable "*")
                        (cl:t ""))))
          (cl:intern
           (cl:concatenate
            'cl:string
            fix
            (cl:nreverse (helper (cl:concatenate 'cl:list name) cl:nil cl:nil))
            fix)
           package))))))

;;;SWIG wrapper code ends here


(cl:defconstant PS_MemoryError 1)

(cl:defconstant PS_IOError 2)

(cl:defconstant PS_RuntimeError 3)

(cl:defconstant PS_Warning 100)

(cl:defconstant PS_LINECAP_BUTT 0)

(cl:defconstant PS_LINECAP_ROUND 1)

(cl:defconstant PS_LINECAP_SQUARED 2)

(cl:defconstant PS_LINEJOIN_MITER 0)

(cl:defconstant PS_LINEJOIN_ROUND 1)

(cl:defconstant PS_LINEJOIN_BEVEL 2)

(cl:defconstant PS_GOTO_NEXT_PAGE -1)

(cl:defconstant PS_GOTO_PREV_PAGE -2)

(cl:defconstant ps_true 1)

(cl:defconstant ps_false 0)

(cffi:defcfun ("PS_get_majorversion" PS_get_majorversion) :int)

(cffi:defcfun ("PS_get_minorversion" PS_get_minorversion) :int)

(cffi:defcfun ("PS_get_subminorversion" PS_get_subminorversion) :int)

(cffi:defcfun ("PS_boot" PS_boot) :void)

(cffi:defcfun ("PS_shutdown" PS_shutdown) :void)

(cffi:defcfun ("PS_set_info" PS_set_info) :void
  (p :pointer)
  (key :string)
  (val :string))

(cffi:defcfun ("PS_new" PS_new) :pointer)

(cffi:defcfun ("PS_new2" PS_new2) :pointer
  (errorhandler :pointer)
  (allocproc :pointer)
  (reallocproc :pointer)
  (freeproc :pointer)
  (opaque :pointer))

(cffi:defcfun ("PS_open_fp" PS_open_fp) :int
  (psdoc :pointer)
  (fp :pointer))

(cffi:defcfun ("PS_get_opaque" PS_get_opaque) :pointer
  (psdoc :pointer))

(cffi:defcfun ("PS_open_mem" PS_open_mem) :int
  (p :pointer)
  (writeproc :pointer))

(cffi:defcfun ("PS_open_file" PS_open_file) :int
  (psdoc :pointer)
  (filename :string))

(cffi:defcfun ("PS_close" PS_close) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_delete" PS_delete) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_begin_page" PS_begin_page) :void
  (psdoc :pointer)
  (width :float)
  (height :float))

(cffi:defcfun ("PS_end_page" PS_end_page) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_set_parameter" PS_set_parameter) :void
  (psdoc :pointer)
  (name :string)
  (value :string))

(cffi:defcfun ("PS_get_parameter" PS_get_parameter) :string
  (psdoc :pointer)
  (name :string)
  (modifier :float))

(cffi:defcfun ("PS_set_value" PS_set_value) :void
  (psdoc :pointer)
  (name :string)
  (value :float))

(cffi:defcfun ("PS_get_value" PS_get_value) :float
  (psdoc :pointer)
  (name :string)
  (modifier :float))

(cffi:defcfun ("PS_list_values" PS_list_values) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_list_parameters" PS_list_parameters) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_list_resources" PS_list_resources) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_set_text_pos" PS_set_text_pos) :void
  (psdoc :pointer)
  (x :float)
  (y :float))

(cffi:defcfun ("PS_setlinewidth" PS_setlinewidth) :void
  (p :pointer)
  (width :float))

(cffi:defcfun ("PS_setlinecap" PS_setlinecap) :void
  (p :pointer)
  (type :int))

(cffi:defcfun ("PS_setlinejoin" PS_setlinejoin) :void
  (p :pointer)
  (type :int))

(cffi:defcfun ("PS_setmiterlimit" PS_setmiterlimit) :void
  (p :pointer)
  (value :float))

(cffi:defcfun ("PS_setflat" PS_setflat) :void
  (p :pointer)
  (value :float))

(cffi:defcfun ("PS_setoverprintmode" PS_setoverprintmode) :void
  (p :pointer)
  (mode :int))

(cffi:defcfun ("PS_setsmoothness" PS_setsmoothness) :void
  (p :pointer)
  (smoothness :float))

(cffi:defcfun ("PS_setdash" PS_setdash) :void
  (p :pointer)
  (on :float)
  (off :float))

(cffi:defcfun ("PS_setpolydash" PS_setpolydash) :void
  (p :pointer)
  (arr :pointer)
  (length :int))

(cffi:defcfun ("PS_curveto" PS_curveto) :void
  (psdoc :pointer)
  (x1 :float)
  (y1 :float)
  (x2 :float)
  (y2 :float)
  (x3 :float)
  (y3 :float))

(cffi:defcfun ("PS_rect" PS_rect) :void
  (psdoc :pointer)
  (x :float)
  (y :float)
  (width :float)
  (height :float))

(cffi:defcfun ("PS_circle" PS_circle) :void
  (psdoc :pointer)
  (x :float)
  (y :float)
  (radius :float))

(cffi:defcfun ("PS_arc" PS_arc) :void
  (psdoc :pointer)
  (x :float)
  (y :float)
  (radius :float)
  (alpha :float)
  (beta :float))

(cffi:defcfun ("PS_arcn" PS_arcn) :void
  (psdoc :pointer)
  (x :float)
  (y :float)
  (radius :float)
  (alpha :float)
  (beta :float))

(cffi:defcfun ("PS_clip" PS_clip) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_setgray" PS_setgray) :void
  (psdoc :pointer)
  (gray :float))

(cffi:defcfun ("PS_closepath" PS_closepath) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_closepath_stroke" PS_closepath_stroke) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_fill_stroke" PS_fill_stroke) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_stroke" PS_stroke) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_fill" PS_fill) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_save" PS_save) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_restore" PS_restore) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_show" PS_show) :void
  (psdoc :pointer)
  (text :string))

(cffi:defcfun ("PS_show2" PS_show2) :void
  (psdoc :pointer)
  (text :string)
  (xlen :int))

(cffi:defcfun ("PS_show_xy" PS_show_xy) :void
  (psdoc :pointer)
  (text :string)
  (x :float)
  (y :float))

(cffi:defcfun ("PS_show_xy2" PS_show_xy2) :void
  (psdoc :pointer)
  (text :string)
  (xlen :int)
  (x :float)
  (y :float))

(cffi:defcfun ("PS_show_boxed" PS_show_boxed) :int
  (psdoc :pointer)
  (text :string)
  (left :float)
  (bottom :float)
  (width :float)
  (height :float)
  (hmode :string)
  (feature :string))

(cffi:defcfun ("PS_continue_text" PS_continue_text) :void
  (psdoc :pointer)
  (text :string))

(cffi:defcfun ("PS_continue_text2" PS_continue_text2) :void
  (psdoc :pointer)
  (text :string)
  (len :int))

(cffi:defcfun ("PS_setcolor" PS_setcolor) :void
  (psdoc :pointer)
  (type :string)
  (colorspace :string)
  (c1 :float)
  (c2 :float)
  (c3 :float)
  (c4 :float))

(cffi:defcfun ("PS_makespotcolor" PS_makespotcolor) :int
  (psdoc :pointer)
  (name :string)
  (reserved :int))

(cffi:defcfun ("PS_findfont" PS_findfont) :int
  (psdoc :pointer)
  (fontname :string)
  (encoding :string)
  (embed :int))

(cffi:defcfun ("PS_stringwidth" PS_stringwidth) :float
  (psdoc :pointer)
  (text :string)
  (fontid :int)
  (size :float))

(cffi:defcfun ("PS_stringwidth2" PS_stringwidth2) :float
  (psdoc :pointer)
  (text :string)
  (xlen :int)
  (fontid :int)
  (size :float))

(cffi:defcfun ("PS_string_geometry" PS_string_geometry) :float
  (psdoc :pointer)
  (text :string)
  (xlen :int)
  (fontid :int)
  (size :float)
  (dimension :pointer))

(cffi:defcfun ("PS_deletefont" PS_deletefont) :void
  (psdoc :pointer)
  (fontid :int))

(cffi:defcfun ("PS_setfont" PS_setfont) :void
  (psdoc :pointer)
  (fontid :int)
  (size :float))

(cffi:defcfun ("PS_getfont" PS_getfont) :int
  (psdoc :pointer))

(cffi:defcfun ("PS_moveto" PS_moveto) :void
  (psdoc :pointer)
  (x :float)
  (y :float))

(cffi:defcfun ("PS_lineto" PS_lineto) :void
  (psdoc :pointer)
  (x :float)
  (y :float))

(cffi:defcfun ("PS_rotate" PS_rotate) :void
  (psdoc :pointer)
  (x :float))

(cffi:defcfun ("PS_translate" PS_translate) :void
  (psdoc :pointer)
  (x :float)
  (y :float))

(cffi:defcfun ("PS_scale" PS_scale) :void
  (psdoc :pointer)
  (x :float)
  (y :float))

(cffi:defcfun ("PS_get_buffer" PS_get_buffer) :string
  (psdoc :pointer)
  (size :pointer))

(cffi:defcfun ("PS_open_image" PS_open_image) :int
  (psdoc :pointer)
  (type :string)
  (source :string)
  (data :string)
  (length :long)
  (width :int)
  (height :int)
  (components :int)
  (bpc :int)
  (params :string))

(cffi:defcfun ("PS_open_image_file" PS_open_image_file) :int
  (psdoc :pointer)
  (type :string)
  (filename :string)
  (stringparam :string)
  (intparam :int))

(cffi:defcfun ("PS_place_image" PS_place_image) :void
  (psdoc :pointer)
  (imageid :int)
  (x :float)
  (y :float)
  (scale :float))

(cffi:defcfun ("PS_close_image" PS_close_image) :void
  (psdoc :pointer)
  (imageid :int))

(cffi:defcfun ("PS_add_weblink" PS_add_weblink) :void
  (psdoc :pointer)
  (llx :float)
  (lly :float)
  (urx :float)
  (ury :float)
  (url :string))

(cffi:defcfun ("PS_add_pdflink" PS_add_pdflink) :void
  (psdoc :pointer)
  (llx :float)
  (lly :float)
  (urx :float)
  (ury :float)
  (filename :string)
  (page :int)
  (dest :string))

(cffi:defcfun ("PS_add_locallink" PS_add_locallink) :void
  (psdoc :pointer)
  (llx :float)
  (lly :float)
  (urx :float)
  (ury :float)
  (page :int)
  (dest :string))

(cffi:defcfun ("PS_add_launchlink" PS_add_launchlink) :void
  (psdoc :pointer)
  (llx :float)
  (lly :float)
  (urx :float)
  (ury :float)
  (filename :string))

(cffi:defcfun ("PS_add_bookmark" PS_add_bookmark) :int
  (psdoc :pointer)
  (text :string)
  (parent :int)
  (open :int))

(cffi:defcfun ("PS_add_note" PS_add_note) :void
  (psdoc :pointer)
  (llx :float)
  (lly :float)
  (urx :float)
  (ury :float)
  (contents :string)
  (title :string)
  (icon :string)
  (open :int))

(cffi:defcfun ("PS_set_border_style" PS_set_border_style) :void
  (psdoc :pointer)
  (style :string)
  (width :float))

(cffi:defcfun ("PS_set_border_color" PS_set_border_color) :void
  (psdoc :pointer)
  (red :float)
  (green :float)
  (blue :float))

(cffi:defcfun ("PS_set_border_dash" PS_set_border_dash) :void
  (psdoc :pointer)
  (black :float)
  (white :float))

(cffi:defcfun ("PS_begin_template" PS_begin_template) :int
  (psdoc :pointer)
  (width :float)
  (height :float))

(cffi:defcfun ("PS_end_template" PS_end_template) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_begin_pattern" PS_begin_pattern) :int
  (psdoc :pointer)
  (width :float)
  (height :float)
  (xstep :float)
  (ystep :float)
  (painttype :int))

(cffi:defcfun ("PS_end_pattern" PS_end_pattern) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_shfill" PS_shfill) :void
  (psdoc :pointer)
  (shading :int))

(cffi:defcfun ("PS_shading" PS_shading) :int
  (psdoc :pointer)
  (shtype :string)
  (x0 :float)
  (y0 :float)
  (x1 :float)
  (y1 :float)
  (c1 :float)
  (c2 :float)
  (c3 :float)
  (c4 :float)
  (optlist :string))

(cffi:defcfun ("PS_shading_pattern" PS_shading_pattern) :int
  (psdoc :pointer)
  (shading :int)
  (optlist :string))

(cffi:defcfun ("PS_create_gstate" PS_create_gstate) :int
  (psdoc :pointer)
  (optlist :string))

(cffi:defcfun ("PS_hyphenate" PS_hyphenate) :int
  (psdoc :pointer)
  (text :string)
  (hyphens :pointer))

(cffi:defcfun ("PS_symbol" PS_symbol) :void
  (psdoc :pointer)
  (c :unsigned-char))

(cffi:defcfun ("PS_symbol_width" PS_symbol_width) :float
  (psdoc :pointer)
  (c :unsigned-char)
  (fontid :int)
  (size :float))

(cffi:defcfun ("PS_symbol_name" PS_symbol_name) :void
  (psdoc :pointer)
  (c :unsigned-char)
  (fontid :int)
  (name :string)
  (size :int))

(cffi:defcfun ("PS_include_file" PS_include_file) :int
  (psdoc :pointer)
  (filename :string))

(cffi:defcfun ("PS_begin_font" PS_begin_font) :int
  (psdoc :pointer)
  (fontname :string)
  (reserverd :int)
  (a :double)
  (b :double)
  (c :double)
  (d :double)
  (e :double)
  (f :double)
  (optlist :string))

(cffi:defcfun ("PS_end_font" PS_end_font) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_begin_glyph" PS_begin_glyph) :int
  (psdoc :pointer)
  (glyphname :string)
  (wx :double)
  (llx :double)
  (lly :double)
  (urx :double)
  (ury :double))

(cffi:defcfun ("PS_end_glyph" PS_end_glyph) :void
  (psdoc :pointer))

(cffi:defcfun ("PS_add_kerning" PS_add_kerning) :void
  (psdoc :pointer)
  (fontid :int)
  (glyphname1 :string)
  (glyphname2 :string)
  (kern :int))

(cffi:defcfun ("PS_add_ligature" PS_add_ligature) :void
  (psdoc :pointer)
  (fontid :int)
  (glyphname1 :string)
  (glyphname2 :string)
  (glyphname3 :string))

(cffi:defcfun ("PS_glyph_show" PS_glyph_show) :void
  (psdoc :pointer)
  (name :string))

(cffi:defcfun ("PS_glyph_list" PS_glyph_list) :pointer
  (psdoc :pointer)
  (fontid :int)
  (charlist :pointer)
  (len :pointer))

(cffi:defcfun ("PS_glyph_width" PS_glyph_width) :float
  (psdoc :pointer)
  (glyphname :string)
  (fontid :int)
  (size :float))

(cffi:defcfun ("PS_free_glyph_list" PS_free_glyph_list) :void
  (psdoc :pointer)
  (charlist :pointer)
  (len :int))


